com.supermap.mapping
Class TrackingMoveHelper
- java.lang.Object
-
- com.supermap.mapping.TrackingMoveHelper
-
public class TrackingMoveHelper extends java.lang.Object
Trace drawing animation class Created by wangli on 2019/8/20.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
TrackingMoveHelper.onDraw
Calls the interface after the whole animation
-
Constructor Summary
Constructors Constructor and Description TrackingMoveHelper(android.content.Context context, MapView mapView, java.util.List<TrackingMoveData> list)
The constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description TrackingMoveHelper
Fellow(boolean fellow)
Whether to enable the following mode.static double
getDistance(double longitude1, double latitude1, double longitude2, double latitude2)
Get DistanceTrackingMoveHelper
Icon(android.graphics.Bitmap bitmap, int bitmapWidth, int bitmapHeight)
Sets the icon and icon sizeTrackingMoveHelper
LineStyle(Color color1, double width)
Sets colors and widths of linesTrackingMoveHelper
OnDraw(TrackingMoveHelper.onDraw onDraw)
Draws animationvoid
pause()
PausesTrackingMoveHelper
Precision(double precision)
Filter point, when the distance between two points is less than the specified value, skip the point. Unit: meters, default 0.0001 metersvoid
reStart()
Starts the animation againTrackingMoveHelper
start()
Starts the animation.void
stop()
StopsTrackingMoveHelper
Time(double time)
The interval between two points in animation execution, unit ms, default value 10
-
-
-
Constructor Detail
-
TrackingMoveHelper
public TrackingMoveHelper(android.content.Context context, MapView mapView, java.util.List<TrackingMoveData> list)
The constructor.- Parameters:
context
-mapView
-list
-
-
-
Method Detail
-
LineStyle
public TrackingMoveHelper LineStyle(Color color1, double width)
Sets colors and widths of lines- Parameters:
color1
-width
-- Returns:
-
Icon
public TrackingMoveHelper Icon(android.graphics.Bitmap bitmap, int bitmapWidth, int bitmapHeight)
Sets the icon and icon size- Parameters:
bitmap
-bitmapWidth
-bitmapHeight
-- Returns:
-
stop
public void stop()
Stops
-
OnDraw
public TrackingMoveHelper OnDraw(TrackingMoveHelper.onDraw onDraw)
Draws animation
-
Fellow
public TrackingMoveHelper Fellow(boolean fellow)
Whether to enable the following mode. No is by default- Parameters:
fellow
-
-
Time
public TrackingMoveHelper Time(double time)
The interval between two points in animation execution, unit ms, default value 10- Parameters:
time
-- Returns:
-
start
public TrackingMoveHelper start()
Starts the animation.- Returns:
-
pause
public void pause()
Pauses
-
reStart
public void reStart()
Starts the animation again
-
Precision
public TrackingMoveHelper Precision(double precision)
Filter point, when the distance between two points is less than the specified value, skip the point. Unit: meters, default 0.0001 meters- Parameters:
precision
- 0.0001 meters is by default.- Returns:
-
getDistance
public static double getDistance(double longitude1, double latitude1, double longitude2, double latitude2)
Get distance- Parameters:
longitude1
- starting point longitudelatitude1
- starting point latitudelongitude2
- end longitudelatitude2
- end latitude- Return:
- distance
-
-